@import url('//at.alicdn.com/t/font_2254478_nhietfhykph.css');
.visualdrag-page {
  height: 100vh;
  .toolbar {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 64px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    .btn {
      margin-right: 15px;
    }
  }
  .con-wrap {
    display: flex;
    justify-content: space-between;
    height: calc(100% - 64px);
    .left,
    .right {
      padding: 10px;
      width: 240px;
      height: 100%;
      background-color: #fff;
      overflow: auto;
      border-right: 1px solid #eee;
    }
    .right{
      border-right: 0;
      border-left: 1px solid #eee;
    }
    .center {
      flex: 1;
      margin: 20px;
      background-color: #fff;
      overflow: auto;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }
    .canvas-box {
      position: relative;
    }
    .canvas-comp-wrap {
      display: table;
      position: absolute;
      cursor: move;
    }
  }
  // 左侧组件列表区
  .components-box {
    .item {
      margin-bottom: 5px;
      border: 1px solid #ddd;
      padding: 5px 8px;
      display: flex;
      align-items: center;
      font-size: 14px;
      cursor: pointer;
      i {
        margin-right: 8px;
      }
    }
  }
  .box-component {
    width: 100%;
    height: 100%;
  }
  .text-component {
    width: 100%;
    height: 100%;
  }
  .circle-component{
    width: 100%;
    height: 100%;
  }
  .grid {
    position: absolute;
    top: 0;
    left: 0;
  }
  .shape {
    position: absolute;
    width: 100%;
    height: 100%;
    &:hover {
      cursor: move;
    }
  }
  .active {
    outline: 1px solid #70c0ff;
    user-select: none;
  }
  .shape-point {
    position: absolute;
    background: #fff;
    border: 1px solid #59c7f9;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 1;
  }
  .icon-xiangyouxuanzhuan {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 600;
    cursor: grab;
    color: #59c7f9;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;

    &:active {
      cursor: grabbing;
    }
  }
  .icon-suo {
    position: absolute;
    top: 0;
    right: 0;
  }
  .mark-line {
    height: 100%;
    .line {
      background: #59c7f9;
      position: absolute;
      z-index: 1000;
    }
    .xline {
      width: 100%;
      height: 1px;
    }
    .yline {
      width: 1px;
      height: 100%;
    }
  }
  // 预览
  .preview-mask{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0,0,0,.3);
  }
  .preview-box{
    position: fixed;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    width: 85%;
    height: 80%;
    background-color: #fff;
    border-radius: 4px;
    .tit{
      padding: 0 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      line-height: 40px;
      border-bottom: 1px solid #eee;
      i{
        cursor: pointer;
      }
    }
    .content{
      height: calc(100% - 40px);
      overflow: auto;
    }
    .preview-canvas-box{
      position: relative;
    }
    .comp-item{
      position: absolute;
    }
  }
  // 右边侧栏属性组件
  .ant-tabs{
    overflow: inherit;
  }
  .attribute-box{
    .attr-item-box{
      .item{
        margin-bottom: 15px;
        &.inline{
          position: relative;
          .label{
            display: inline-block;
            float: left;
            line-height: 32px;
          }
        }
      }
      .label{
        margin-bottom: 8px;
      }
      .color-box-wrap{
        position: relative;
        display: inline-block;
        margin-left: 8px;
        width: 32px;
        height: 32px;
        border: 4px solid #fff;
        box-shadow: 0 0 0 1px #e6e6e6;
        border-radius: 4px;
        cursor: pointer;
      }
      .color-picker-box-wrap{
        position: relative;
        z-index: 100;
      }
    }
  }
}
